import pinia from '@/store'
import useUserStore from '@/store/modules/user'
let userStore = useUserStore(pinia)
export const isHasButton = (el: any) => {
  el.directive('has', {
    mounted(el: any, option: any) {
      console.log(el.value)
      console.log(option.value)
      console.log(userStore.buttons)
      if (!userStore.buttons.includes(option.value))
        el.parentNode.removeChild(el)
    },
  })
}
